package com.lingchen.model;


/**
 * Author    lingchen
 * Email     838878458@qq.com
 * Time      2017/3/15
 * Function  数据返回模型
 */
public class ResBaseModel<T> {
    public static final int CODE_SUCCESS = 1;
    public static final int CODE_FAILED = 0;

    private int code = CODE_SUCCESS;
    private String message = "操作成功";

    private T data;

    public ResBaseModel() {
    }

    public ResBaseModel(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public ResBaseModel(T data) {
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
